<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/12/17
 * Time: 19:51
 */
class Logout extends MY_Api_Controller
{
    function __construct(){
        parent::__construct();
    }

    function index($rest=false){
        $this->load->library('Auth_nuan');
        $this->auth_nuan->logout();
        if($rest)
            $this->set_response(0);
        else
            redirect(site_url());
    }
}